<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>个人信息 - 志愿服务管理系统</title>
  <!-- Bootstrap CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
  <style>
    :root {
      --primary-color: #337ab7;
      --hover-color: #286090;
      --text-color: #333;
      --bg-light: #f8f9fa;
      --border-radius: 10px;
      --shadow: 0 2px 10px rgba(0,0,0,0.1);
      --transition: all 0.3s ease;
    }

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
      min-height: 100vh;
      padding: 20px;
    }

    .container {
      max-width: 900px;
      margin: 0 auto;
    }

    .info-card {
      background: white;
      border-radius: var(--border-radius);
      box-shadow: var(--shadow);
      padding: 30px;
      margin-bottom: 20px;
    }

    .page-title {
      color: var(--primary-color);
      font-size: 28px;
      font-weight: 600;
      margin-bottom: 30px;
      text-align: center;
      padding-bottom: 15px;
      border-bottom: 2px solid #eee;
    }

    .info-section {
      margin-bottom: 25px;
    }

    .info-label {
      font-size: 14px;
      color: #666;
      margin-bottom: 8px;
      font-weight: 500;
    }

    .info-value {
      font-size: 16px;
      color: var(--text-color);
      padding: 10px 15px;
      background: var(--bg-light);
      border-radius: 6px;
      border: 1px solid #dee2e6;
    }

    .role-badge {
      display: inline-block;
      padding: 8px 16px;
      background: var(--primary-color);
      color: white;
      border-radius: 20px;
      font-size: 14px;
      font-weight: 500;
    }

    .status-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 16px;
      border-radius: 20px;
      font-size: 14px;
      font-weight: 500;
    }

    .status-badge.active {
      background: #28a745;
      color: white;
    }

    .status-badge.inactive {
      background: #dc3545;
      color: white;
    }

    .action-buttons {
      display: flex;
      justify-content: center;
      gap: 15px;
      margin-top: 30px;
    }

    .btn-custom {
      padding: 10px 25px;
      border-radius: 6px;
      font-weight: 500;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: var(--transition);
    }

    .btn-custom:hover {
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    }

    .btn-back {
      background: #6c757d;
      color: white;
      border: none;
    }

    .btn-back:hover {
      background: #5a6268;
      color: white;
    }

    .btn-edit {
      background: var(--primary-color);
      color: white;
      border: none;
    }

    .btn-edit:hover {
      background: var(--hover-color);
      color: white;
    }

    .avatar-section {
      text-align: center;
      margin-bottom: 30px;
    }

    .avatar-circle {
      width: 120px;
      height: 120px;
      border-radius: 50%;
      background: var(--primary-color);
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 15px;
      color: white;
      font-size: 48px;
      box-shadow: var(--shadow);
    }

    /* 添加动画效果 */
    .fade-in {
      animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
    }
  </style>
</head>
<body>

<div class="container fade-in">
  <div class="info-card">
    <h1 class="page-title">个人信息</h1>

    <div class="avatar-section">
      <div class="avatar-circle">
        <i class="fas fa-user"></i>
      </div>
    </div>

    <div class="row">
      <div class="col-md-6">
        <div class="info-section">
          <div class="info-label">账号ID</div>
          <div class="info-value" th:text="${admin.id}">-</div>
        </div>
      </div>
      <div class="col-md-6">
        <div class="info-section">
          <div class="info-label">昵称</div>
          <div class="info-value" th:text="${admin.nickname}">-</div>
        </div>
      </div>
      <div class="col-md-6">
        <div class="info-section">
          <div class="info-label">手机号码</div>
          <div class="info-value" th:text="${admin.mobile}">-</div>
        </div>
      </div>
      <div class="col-md-6">
        <div class="info-section">
          <div class="info-label">角色权限</div>
          <div class="info-value">
            <span class="role-badge" th:text="${admin.role}">管理员</span>
          </div>
        </div>
      </div>
<!--      <div class="col-md-6">-->
<!--        <div class="info-section">-->
<!--          <div class="info-label">发布权限</div>-->
<!--          <div class="info-value">-->
<!--                        <span th:if="${admin.publish == 1}" class="status-badge active">-->
<!--                            <i class="fas fa-check-circle"></i>已启用-->
<!--                        </span>-->
<!--            <span th:if="${admin.publish == 0}" class="status-badge inactive">-->
<!--                            <i class="fas fa-times-circle"></i>已禁用-->
<!--                        </span>-->
<!--          </div>-->
<!--        </div>-->
<!--      </div>-->

      <div class="col-md-6">
        <div class="info-section">
          <div class="info-label">发布活动</div>
          <div class="info-value" th:text="${admin.getPublish()}">-</div>
        </div>
      </div>


      <div class="col-md-6">
        <div class="info-section">
          <div class="info-label">注册时间</div>
          <div class="info-value" th:text="${#dates.format(admin.registerDate, 'yyyy-MM-dd HH:mm:ss')}">-</div>
        </div>
      </div>
      <div class="col-md-12">
        <div class="info-section">
          <div class="info-label">最后更新时间</div>
          <div class="info-value" th:text="${#dates.format(admin.updateDate, 'yyyy-MM-dd HH:mm:ss')}">-</div>
        </div>
      </div>
    </div>

    <div class="action-buttons">
      <a href="#" th:href="@{/superAdmin}" class="btn btn-custom btn-back">
        <i class="fas fa-arrow-left"></i>返回
      </a>
    </div>
  </div>
</div>

<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>

</body>
</html>